using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class BtbElseDetailDTO : INotifyPropertyChanged
    {
        private Int64 _BtbDetailId;
        private String _Description;
        private ItemDTO _Item;
        private String _KodeMasuk;
        private string _KodePallet;
        private Decimal _Lebar;
        private int _No;
        private string _NoBtb;
        private int _NoBundle;
        private String _NoLog;
        private PalletDTO _Pallet;
        private ObservableCollection<PalletDTO> _Pallets;
        private Decimal _Panjang;
        private Decimal _Price;
        private Decimal _QtyPack;
        private Decimal _QtyUnit;
        private SatuanDTO _SatuanPack;
        private ObservableCollection<SatuanDTO> _SatuanPacks;
        private SatuanDTO _SatuanUnit;
        private ObservableCollection<SatuanDTO> _SatuanUnits;
        private Decimal _Tinggi;
        private WarehouseDTO _Warehouse;
        private ObservableCollection<WarehouseDTO> _Warehouses;
        private ObservableCollection<ItemDTO> _items;

        public BtbElseDetailDTO()
        {
            Item = new ItemDTO();
            QtyPack = 1;
        }

        [DataMember]
        public Int64 BtbDetailId
        {
            get { return _BtbDetailId; }
            set
            {
                _BtbDetailId = value;
                RaisePropertyChanged("BtbDetailId");
            }
        }

        [DataMember]
        public String NoLog
        {
            get { return _NoLog; }
            set
            {
                _NoLog = value;
                RaisePropertyChanged("NoLog");
            }
        }


        [DataMember]
        public int NoBundle
        {
            get { return _NoBundle; }
            set
            {
                _NoBundle = value;
                RaisePropertyChanged("NoBundle");
            }
        }


        [DataMember]
        public ItemDTO Item
        {
            get { return _Item; }
            set
            {
                _Item = value;
                RaisePropertyChanged("Item");
            }
        }


        [DataMember]
        public Decimal QtyPack
        {
            get { return _QtyPack; }
            set
            {
                _QtyPack = value;
                RaisePropertyChanged("QtyPack");
            }
        }


        [DataMember]
        public Decimal Panjang
        {
            get { return _Panjang; }
            set
            {
                _Panjang = value;
                RaisePropertyChanged("Panjang");
            }
        }


        [DataMember]
        public Decimal Lebar
        {
            get { return _Lebar; }
            set
            {
                _Lebar = value;
                RaisePropertyChanged("Lebar");
            }
        }


        [DataMember]
        public Decimal Tinggi
        {
            get { return _Tinggi; }
            set
            {
                _Tinggi = value;
                RaisePropertyChanged("Tinggi");
            }
        }


        [DataMember]
        public Decimal QtyUnit
        {
            get { return _QtyUnit; }
            set
            {
                _QtyUnit = value;
                RaisePropertyChanged("QtyUnit");
            }
        }


        [DataMember]
        public WarehouseDTO Warehouse
        {
            get { return _Warehouse; }
            set
            {
                _Warehouse = value;
                RaisePropertyChanged("Warehouse");
            }
        }


        [DataMember]
        public string KodePallet
        {
            get { return _KodePallet; }
            set
            {
                _KodePallet = value;
                RaisePropertyChanged("KodePallet");
            }
        }


        [DataMember]
        public String KodeMasuk
        {
            get { return _KodeMasuk; }
            set
            {
                _KodeMasuk = value;
                RaisePropertyChanged("KodeMasuk");
            }
        }


        [DataMember]
        public String Description
        {
            get { return _Description; }
            set
            {
                _Description = value;
                RaisePropertyChanged("Description");
            }
        }


        [DataMember]
        public SatuanDTO SatuanUnit
        {
            get { return _SatuanUnit; }
            set
            {
                _SatuanUnit = value;
                RaisePropertyChanged("SatuanUnit");
            }
        }


        [DataMember]
        public SatuanDTO SatuanPack
        {
            get { return _SatuanPack; }
            set
            {
                _SatuanPack = value;
                RaisePropertyChanged("SatuanPack");
            }
        }

        [DataMember]
        public Decimal Price
        {
            get { return _Price; }
            set
            {
                _Price = value;
                RaisePropertyChanged("Price");
            }
        }

        public ObservableCollection<ItemDTO> Items
        {
            get { return _items; }
            set
            {
                _items = value;
                RaisePropertyChanged("Items");
            }
        }

        public ObservableCollection<PalletDTO> Pallets
        {
            get { return _Pallets; }
            set
            {
                _Pallets = value;
                RaisePropertyChanged("Pallets");
            }
        }

        [DataMember]
        public String NoBtb
        {
            get { return _NoBtb; }
            set
            {
                _NoBtb = value;
                RaisePropertyChanged("NoBtb");
            }
        }

        public ObservableCollection<SatuanDTO> SatuanPacks
        {
            get { return _SatuanPacks; }
            set
            {
                _SatuanPacks = value;
                RaisePropertyChanged("SatuanPacks");
            }
        }

        public ObservableCollection<SatuanDTO> SatuanUnits
        {
            get { return _SatuanUnits; }
            set
            {
                _SatuanUnits = value;
                RaisePropertyChanged("SatuanUnits");
            }
        }

        public ObservableCollection<WarehouseDTO> Warehouses
        {
            get { return _Warehouses; }
            set
            {
                _Warehouses = value;
                RaisePropertyChanged("Warehouses");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}